<?php

/**
 * 
 * @version $Id: Contato.php 2 2012-05-26 02:24:18Z joaopaulopvillela@gmail.com $
 */
class Default_Form_Contato extends Zend_Form
{
	public function init ()
	{
		$elements = array();
		
		$decorator = array( 'ViewHelper' );
		
		$elements[] = $this->createElement('text', 'nome')
			->setDecorators($decorator)
			->addFilter('StripTags')
			->addFilter('StringTrim') 
			->setAttrib('maxlength', 100)
			->setAttrib('class', 'text')
			->setRequired(true);
			
		$elements[] = $this->createElement('text', 'email')
			->setDecorators($decorator)
			->addFilter('StripTags')
			->addValidator('EmailAddress')
			->setAttrib('maxlength', 100)
			->setAttrib('class', 'text')
			->setRequired(true);
			
		$elements[] = $this->createElement('text', 'assunto')
			->setDecorators($decorator)
			->addFilter('StripTags')
			->addFilter('StringTrim')
			->setAttrib('class', 'text')
			->setRequired(true);
			
		$elements[] = $this->createElement('textarea', 'mensagem')
			->setDecorators($decorator)
			->addFilter('StripTags')
			->setAttrib('rows', 6)
			->setAttrib('cols', 50)
			->setRequired(true);
		
		$this->setElements( $elements );
	}
}